<template>
  <div id="app">
    <div class="todo-container">
      <div class="todo-wrap">
        <TodoHeader :taskList.sync="taskList" />
        <TodoMain :taskList.sync="taskList" />
        <TodoFooter :taskList.sync="taskList" />
      </div>
    </div>
  </div>
</template>

<script>
// import "@/assets/css/index.css"
import "@/assets/css/base.css"
import TodoHeader from "@/components/TodoHeader";
import TodoMain from "@/components/TodoMain";
import TodoFooter from "@/components/TodoFooter";
export default {
  name: "App",
  data(){
    return {
      taskList:localStorage.getItem("taskList")?JSON.parse(localStorage.getItem("taskList")):[]
    }
  },
  updated() {
    localStorage.setItem("taskList",JSON.stringify(this.taskList))
  },
  components: {
    TodoHeader,
    TodoMain,
    TodoFooter
  }
}
</script>
<style lang="less" scoped>
/*app*/
.todo-container {
  width: 600px;
  margin: 0 auto;
}
.todo-container .todo-wrap {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
}
</style>
